修改图形图例

您所在的位置:网站首页 stata legend position 修改图形图例

修改图形图例

2024-07-10 21:45| 来源: 网络整理| 查看: 265

首先,我们用到系统数据auto做一个简单的散点图,键入如下命令:

sysuse auto,clear

twoway(scatter mpg weight if foreign==0,mcolor(%50) ) ///

(scatter mpg weight if foreign==1,msymbol(Sh))  ///

,ytitle(里程)   xtitle(重量)   ///

note(note:数据来自美国汽车协会)    ///

text(35 3400 "曲线类型:散点图")  

graph export g1.png,replace  

!taskkill /F/IM WINWORD.EXE /T 

clear all

putdocx begin  

putdocx paragraph,halign(center)

putdocx text ("行驶里程与车重关系"),bold font(仿宋_GB2312,15,black) linebreak 

  putdocx text ("美国国产和进口汽车"),font(仿宋_GB2312,12,red) linebreak  

putdocx image g1.png,width(6)  

putdocx save g1.docx,replace  

shellout g1.docx 

结果如下:



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3